#ifndef FAKESHARESPAGE_H
#define FAKESHARESPAGE_H

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "PropPage.h"
#include "ExListViewCtrl.h"

class FakeSharesPage : public CPropertyPage<IDD_FAKE_SHARES>, public PropPage
{
public:
	FakeSharesPage(SettingsManager *s) : PropPage(s) { 
		SetTitle(CTSTRING(SETTINGS_FAKE_SHARES));
	};

	virtual ~FakeSharesPage() { 
		ctrlFakeShares.Detach();
	};

	BEGIN_MSG_MAP(FakeSharesPage)
		MESSAGE_HANDLER(WM_INITDIALOG, onInitDialog)
		COMMAND_ID_HANDLER(IDC_ADD_FAKE_SHARE, onAddFakeShare)
		COMMAND_ID_HANDLER(IDC_REMOVE_FAKE_SHARE, onRemoveFakeShare)
		COMMAND_ID_HANDLER(IDC_CHANGE_FAKE_SHARE, onChangeFakeShare)
		NOTIFY_HANDLER(IDC_FAKE_SHARE_ITEMS, NM_DBLCLK, onDblClick)
	END_MSG_MAP()

	LRESULT onInitDialog(UINT, WPARAM, LPARAM, BOOL&);

	LRESULT onAddFakeShare(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT onChangeFakeShare(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT onRemoveFakeShare(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);

	LRESULT onDblClick(int /*idCtrl*/, LPNMHDR /* pnmh */, BOOL& bHandled) {
		return onChangeFakeShare(0, 0, 0, bHandled);
	}

	// Common PropPage interface
	PROPSHEETPAGE *getPSP() { return (PROPSHEETPAGE *)*this; }
	virtual void write();
	
protected:
	ExListViewCtrl ctrlFakeShares;

	static Item items[];
	static TextItem texts[];
};

#endif //FAKESHARESPAGE_H

/**
 * @file
 * $Id: FakeSharesPage.h,v 1.0 2004/02/22 14:06 psf8500 Exp $
 */